package com.itheima.test;

import com.itheima.domain.User;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;


public class 修改 {
    public static void main(String[] args) throws Exception {
        SqlSession sqlSession = new SqlSessionFactoryBuilder().build(Resources.getResourceAsStream("mybatis-conﬁg.xml")).openSession(true);
        User user = new User();
        user.setUid(1);
        user.setName("世豪");
        user.setBirthday("1995-01-24");

        int update = sqlSession.update("UserMapper.update",user);

        System.out.println("共"+update+"行受到影响");

        sqlSession.close();
    }
}
